

<div class="layui-form" lay-filter="back-config-form">
  <div class="layui-form-item">
    <label class="layui-form-label">配置名称</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="hidden" name="id" value="{{ d.params.id || '' }}">
        <input type="text" name="name" value="{{ d.params.name || '' }}" lay-verify="required" placeholder="请输入配置名称" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">配置别名</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="alias" value="{{ d.params.alias || '' }}" lay-verify="required" placeholder="请输入配置名称" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">值类型</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <select name="type">
          <option value="string" {{ d.params.type == 'string'?'selected':'' }}>string</option>
          <option value="number" {{ d.params.type == 'number'?'selected':'' }}>number</option>
          <option value="array"  {{ d.params.type == 'array'?'selected':'' }}>array</option>
          <option value="json"   {{ d.params.type == 'json'?'selected':'' }}>json</option>
        </select>
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">值</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="value" value="{{ d.params.value || '' }}" lay-verify="required" placeholder="请输入值" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">排序</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="sort" value="{{ d.params.sort || 0 }}" placeholder="请输入排序值" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">描述</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <textarea type="text" name="desc" autocomplete="off" class="layui-textarea">{{ d.params.desc || '' }}</textarea>
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label"></label>
    <div class="layui-input-inline">
      <input type="button" lay-submit lay-filter="back-config-form-submit" value="确认" class="layui-btn">
      <button class="layui-btn" type="button" id="layer-close">关闭</button>
    </div>
  </div>
</div>

<script>
layui.use(['admin', 'form'], function(){
  var $ = layui.$
  ,form = layui.form;
  
});
</script>
